package com.jian.mall.produce.vo;

import com.jian.mall.produce.entity.SkuImagesEntity;
import com.jian.mall.produce.entity.SkuInfoEntity;
import com.jian.mall.produce.entity.SpuInfoDescEntity;
import lombok.Data;

import java.util.List;

@Data
public class SaleItemVo {
    // sku基本信息
    SkuInfoEntity info;
    // sku的图片信息
    List<SkuImagesEntity> images;
    // sku的销售组合
    List<SkuItemSaleAttr> saleAttrs;
    // spu的介绍
    SpuInfoDescEntity desp;
    // spu的规格参数信息
    List<SpuGroupAttr> spuItemBases;

    @Data
    public static class SkuItemSaleAttr {
        Long attrId;
        String attrName;
        List<AttrSale> attrSale;
    }

    @Data
    public static class AttrSale {
        private List<Long> id;
        private String attrValue;
    }

    @Data
    public static class SpuGroupAttr {
        private String groupName;
        private List<SpuBaseAttr> baseAttrs;
    }

    @Data
    public static class SpuBaseAttr {
        String attrName;
        String attrValue;
    }

}
